<template>
    <div class="WebMapServiceImageryProvider">
        <cesium-viewer @viewerAlready="viewerAlready">
        </cesium-viewer>
    </div>
</template>

<script>
    import CesiumViewer from "../../CesiumViewer";
    import {addAdditionalLayerOption} from "../../../utils/layersHandler";

    export default {
        name: "WebMapServiceImageryProvider",
        //import引入的组件需要注入到对象中才能使用",
        components: {CesiumViewer},
        data() {
            //这里存放数据",
            return {
            };
        },
        //方法集合",
        methods: {
            viewerAlready() {
                addAdditionalLayerOption(
                    "WebMapServiceImageryProvider",
                    new Cesium.WebMapServiceImageryProvider({
                        url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
                        layers : '0',
                        proxy: new Cesium.DefaultProxy('/proxy/')
                    })
                );
            }
        }
    }
</script>

